﻿using System;
using System.Collections.Generic;
using System.Text;

namespace BCDto.Common.TreeNode
{
    /// <summary>
    /// 树形节点
    /// </summary>
    /// <typeparam name="T">源数据类型</typeparam>
    public class TreeNodeDto<T>
    {
        /// <summary>
        /// 键
        /// </summary>
        public string Key { get; set; }
        /// <summary>
        /// 节点值
        /// </summary>
        public object Value { get; set; }
        /// <summary>
        /// 节点显示标题
        /// </summary>
        public string Title { get; set; }
        /// <summary>
        /// 禁用
        /// </summary>
        public bool Disabled { get; set; }
        /// <summary>
        /// 叶子节点（最末尾的节点了）
        /// </summary>
        public bool IsLeaf { get; set; }
        /// <summary>
        /// 是否展开
        /// </summary>
        public bool Expanded { get; set; }
        /// <summary>
        /// 是否已选中
        /// </summary>
        public bool Checked { get; set; }
        /// <summary>
        /// 子节点信息
        /// </summary>
        public List<TreeNodeDto<T>> Children { get; set; }
        /// <summary>
        /// 源数据
        /// </summary>
        public T SourceData { get; set; }
    }
}
